interface Meta {
  id?: number;
  icon?: string;
  hidden?: boolean;
  parent?: any;
}

interface RouteType {
  name?: string,
  redirect?: any;
  path: string,
  page?: string,
  children?: Array<RouteType>,
  meta?: Meta
}
// 需要显示的路由菜单
const extendRoutes: Array<RouteType> = [
  {
    name: 'Login',
    path: 'Login',
    page: 'common/Login',
  },{
    name: 'Re',
    path: '/',
    page: 'common/Login',
  }, {
    name: 'Register',
    path: 'Register',
    page: 'common/Register',
  }, {
    name: 'Missions',
    path: 'Missions',
    page: 'missions/Missions',
    meta: {
      icon: 'assignment',
      hidden: false,
    },
  },
  {
    name: 'Deals',
    path: 'Deals',
    page: 'missions/Deals',
    meta: {
      icon: 'assignment',
      hidden: true,
    },
  },
  {
    name: 'MissionDetail',
    path: 'MissionDetail',
    page: 'missions/MissionDetail',
    meta: {
      hidden: false,
    },
  },
  {
    name: 'My',
    path: 'My',
    page: 'my/My',
    meta: {
      icon: 'account_box',
      hidden: false,
    },
    children: [{
      name: 'MyWallet',
      path: 'MyWallet',
      page: 'my/MyWallet',
    }, {
      name: 'MyMissions',
      path: 'MyMissions',
      page: 'my/MyMissions',
    }, {
      name: 'ReferFriend',
      path: 'ReferFriend',
      page: 'my/ReferFriend',
    }, {
      name: 'Settings',
      path: 'Settings',
      page: 'my/Settings',
    }, {
      name: 'Qna',
      path: 'Qna',
      page: 'common/Qna',
    },]
  },
  {
    name: 'MainQna',
    path: 'Qna',
    page: 'common/Qna',
    meta: {
      icon: 'account_box',
      hidden: false,
    },
  },

];

const fullRoutes: Array<RouteType> = [{
  name: 'Home',
  path: '/',
  page: 'Home',
  children: extendRoutes
},];


export {
  extendRoutes,
  fullRoutes,
  RouteType,
}

